import { BasicColumn, FormSchema } from "/@/components/Table"
import { render } from "/@/utils/common/renderUtils"
import DictEnum from "/@/enums/dictEnum"

export const columns: BasicColumn[] = [
  {
    title: "图标",
    dataIndex: "logo",
    align: "left",
    width: 80,
    customRender: ({ text }) => {
      return render.renderImagePreview({
        imageList: [{ src: text, width: 80 }],
      })
    },
  },

  {
    title: "名称",
    dataIndex: "name",
    width: 130,
    // slots: { customRender: 'name' },
    align: "left",
  },
  {
    title: "描述",
    width: 240,
    dataIndex: "description",
    align: "left",
  },
  {
    title: "身份源类型",
    dataIndex: "type",
    width: 120,
    customRender: ({ text }) => {
      return render.renderTag(render.renderDict(text, DictEnum.ExtIdpType), "green")
    },
  }
]
